<?php
$this->pageTitle = Yii::app()->name . ' - Đăng ký thành viên';
$this->breadcrumbs = array(
    'Đăng ký thành viên',
);
?>
<?php if(Yii::app()->user->hasFlash('register')): ?>

<div class="flash-success">
    <?php echo Yii::app()->user->getFlash('register'); ?>
</div>

<?php else: ?>
<div class="form" id="login">
    <?php
    /* @var $this SiteController
     * @var $form CActiveForm
     * @var $model RegisterForm
     */

    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'register-form',
        'htmlOptions' => array('class'=>'box-shadow'),
        'enableClientValidation' => true,
        'clientOptions' => array(
            'validateOnSubmit' => true,
        ),
    )); ?>

<!--    <p><img src="--><?php //echo Yii::app()->request->baseUrl; ?><!--/images/lntlogo.png"/></p>-->
    <div class="row">
        <?php echo $form->labelEx($model, 'username'); ?>
        <?php echo $form->textField($model, 'username'); ?>
        <?php echo $form->error($model, 'username'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'password'); ?>
        <?php echo $form->passwordField($model, 'password'); ?>
        <?php echo $form->error($model, 'password'); ?>
    </div>
    <div class="row">
        <?php echo $form->labelEx($model, 'password2'); ?>
        <?php echo $form->passwordField($model, 'password2'); ?>
        <?php echo $form->error($model, 'password2'); ?>
    </div>

    <div class="row">
        <?php echo $form->label($model, 'email'); ?>
        <?php echo $form->textField($model, 'email'); ?>
        <?php echo $form->error($model, 'email'); ?>
    </div>
    <div class="row">
        <?php echo $form->label($model, 'display_name'); ?>
        <?php echo $form->textField($model, 'display_name'); ?>
        <?php echo $form->error($model, 'display_name'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton('Đăng ký'); ?>
    </div>

    <?php $this->endWidget(); ?>
</div><!-- form -->
<?php endif; ?>